package com.help10000.rms.mvp.presenter

import com.amir.common.api.CustomObserver
import com.amir.common.beans.AppVersionInfoEntity
import com.amir.common.mvp.model.Model
import com.amir.common.mvp.presenter.BasePresenter
import com.help10000.rms.mvp.view.CommonView

class AppVersionInfoPresenter(view: CommonView<AppVersionInfoEntity>) :
    BasePresenter<CommonView<AppVersionInfoEntity>>(view) {

    /**
     * 收款
     */
    fun checkUpdate() {
        val applyInit = Model.getServer().checkVersion()
        Model.getObservable(applyInit, object : CustomObserver<AppVersionInfoEntity>(mvpView) {

            override fun success(t: AppVersionInfoEntity) {
                mvpView?.onDataSuccess(t)
            }
        })
    }


}